package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * 容器
 * </p>
 *
 * @author LEO
 * @since 2020-08-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="Container对象", description="容器")
@TableName("wms_container")
public class Container extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "组织机构")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "容器条码")
    @Length(max = 100, message = "容器条码长度不能大于100个字符", groups = {Save.class, Update.class})
    @TableField("bar_code")
    private String barCode;

    @ApiModelProperty(value = "容器类型;0: 托盘； 1：周转箱")
    @TableField("type")
    private String type;


    @ApiModelProperty(value = "状态 0 启用 1停用")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "是否可删除操作 0-不可删除 1-可删除")
    @TableField("delete_flag")
    private String deleteFlag;

    @ApiModelProperty(value = "备注")
    @Length(max = 100, message = "容器条码长度不能大于100个字符", groups = {Save.class, Update.class})
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "是否占用")
    @TableField("occupy")
    private String occupy;

    @ApiModelProperty(value = "占用单据编码，如收货单号")
    @TableField("occupy_code")
    private String occupyCode;

    public interface Save{}
    public interface Update{}
}
